1. Field of the Invention
The present invention relates to wireless communication system protocols. More particularly the present invention relates to encoding and decoding a Medium Access Control (MAC) layer packet.
2. Description of the Related Art
Broadband wireless networks are based on various communication standards, for example, the Institute of Electrical and Electronics Engineers (IEEE) 802.16e based Worldwide Interoperability for Microwave Access (WiMAX) standard, and its evolution to IEEE 802.16m, provides various types of services such as voice, packet data exchange, and the like. In such a network, user data and control information is exchanged between a Mobile Station (MS) and a Base Station (BS) by establishing a connection. The control information is generated by various protocols running at the MS and the BS. The data packets are generated by various applications at the MS and BS. Typically, wireless communication standards beyond 3rd Generation (3G), for example 3G Partnership Project (3GPP) Long Term Evolution (LTE), IEEE 802.20, and IEEE 802.16e-2005, mobile WiMAX, and the like, use Protocol Data Units (PDUs) to carry the control and data information.
The IEEE 802.16m communication standard is associated with a protocol architecture that includes PHYsical (PHY) layer and Medium Access Control (MAC) layer specifications. The MAC layer comprises three sub-layers which are the specific Convergence Sub-layer (CS), the MAC Common Part Sub-layer (MAC CPS), and the security sub-layer. The CS provides transformation and/or mapping of external network data, received through the CS Service Access Point (SAP), into MAC Service Data Units (SDUs) received by the MAC CPS through the MAC SAP. This includes classifying external network SDUs and associating the external network SDUs to an appropriate MAC connection. It may also include other functions such as Payload Header Suppression (PHS).
The MAC CPS receives data from the various CSs, through the MAC SAP, classified to particular MAC connections. Data is transferred between the MAC CPS and the PHY layer via the PHY SAP. The MAC CPS also contains a separate security sub-layer that provides authentication, secure key exchange, and encryption. The MAC CPS forms an IEEE 802.16m based MAC PDU. The MAC PDU format includes a Generic MAC Header (GMH), an Extended Header (EH), and payload. Each connection payload includes one or more MAC SDUs or MAC SDU fragments received from the CS layer for the particular connection.
Further, the GMH format (based on the IEEE 802.16m standard) includes a Flow Identifier (Flow ID) field, an Extended Header (EH) field, and a Length field. A connection is identified by the Flow ID field. The EH field indicates whether an extended header is present in the MAC PDU or not. Further, the Length field gives information about the MAC PDU payload. The EH field includes a subfield to identify the type of specific contents. The EH field contains a type field and a body contents field. The type field indicates the type of extended header and the body contents field indicates the type-dependent contents.
The MAC PDU format includes a fixed size GMH, an optional EH, and payload. Thus, during communication each application will be associated with one connection. Hence, the connection information will be stored in the MAC PDU. The MAC layer encodes multiple MAC PDUs (MPDUs) to form a MAC layer packet, which is sent to a PHY layer for transmitting through the air. The size (in bytes) of a MAC layer packet formed by a MAC Layer is equal to a number of bytes requested by the PHY layer from the MAC layer. Thereafter, the multiple MAC PDUs that are encoded in the MAC layer packet are sent from the PHY layer of a transmitting communication device to a PHY layer of a receiving communication device. Thereafter, the MAC layer packet is decoded in another communication device.
However, there may be a scenario where the MAC layer may not have enough information bytes to form a MAC layer packet of a size that is requested by the PHY layer. In such a scenario, the MAC layer packet is formed by encoding multiple PDUs that are available from various connections followed by unfilled empty bytes. Thus, when the receiving communication device receives the MAC layer packet, it decodes the GMH and determines the end of MAC PDU. The receiving communication device continues this process until it reaches the end of MAC layer packet. Hence, the receiving communication device tries to decode the GMH after the last MAC PDU in the MAC layer packet even if the MAC layer packet had an unfilled portion following the last MAC PDU. This is because the end of the MAC PDU information in the MAC layer packet is not indicated. This results in incorrect decoding of the MAC layer packet at the receiving device and thereby reduces efficiency of the system.
Hence there exists a need to efficiently encode and decode MAC PDUs in the MAC layer packet.